using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreData;
using Services;
using Helper;
namespace ActionServices
{

    public interface ICourseActionService:BaseActionService
    {
        long Save(object _model, ref string mess);
        IList<CoreData.Course> GetListByLINQ(Func<CoreData.Course, Boolean> _where);
        CoreData.Course GetOneByLINQ(Func<CoreData.Course, Boolean> _where);
        bool Delete(object _model);
        
        bool UpdateIsDelete(object _model);
        Course GetbyClassID(long classid);
        CoreData.Course GetByCode(string Code);
        string GenCodeCourse();
    }

    public partial class CourseActionService:ICourseActionService
    {
       CourseService Service;

       public CourseActionService()
       {
           Service = new CourseService();
       }

       #region Main Method

       public virtual long Save(object _model, ref string mess)
       {
           return Service.Save(_model, ref mess);
       }

       public virtual object GetByID(long _id)
       {
           return Service.GetByID(_id);
       }

       public virtual object GetList()
       {
           return Service.GetList();
       }

       public virtual IList<CoreData.Course> GetListByLINQ(Func<CoreData.Course, Boolean> _where)
       {
           return Service.GetListByLINQ(_where);
       }

       public virtual CoreData.Course GetOneByLINQ(Func<CoreData.Course, Boolean> _where)
       {
           return Service.GetOneByLINQ(_where);
       }

       public virtual object GetList(string _searchstring)
       {
           return Service.GetList(_searchstring);
       }

       public virtual bool Delete(object _model)
       {
           return Service.Delete(_model);
       }

       public virtual bool UpdateIsDelete(object _model)
       {
           return Service.UpdateIsDelete(_model);
       }
       #endregion


        #region Other Method
       public virtual CoreData.Course GetByCode(string Code)
       {
           return Service.GetByCode(Code);
       }
     
       public virtual Course GetbyClassID(long classid)
       {
           return Service.GetbyClassID(classid);
       }
        public virtual  string GenCodeCourse()
       {
           return Service.GenCodeCourse();
    }
        #endregion

    }
         
}
